home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
T_BCINFO.ARJ
/
TI723.ASC
< prev
next >
Wrap
Text File
|
1992-02-25
|
901b
|
67 lines
PRODUCT : Borland C++ NUMBER : 723
VERSION : 2.0
OS : DOS
DATE : February 25, 1992 PAGE : 1/1
TITLE : matherr and signal Handlers
/**************************************************************
This program illustrates how to use matherr and signal.
***************************************************************/
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
/*
New matherr function.
*/
int matherr(struct exception *s)
{
puts("matherr!! \n");
return 1;
}
/*
New signal handler.
*/
void catcher(void)
{
puts("catcher!!\n");
}
int main(void)
{
int x;
signal(SIGFPE,catcher);
x = log(-1);
return 0;
}